﻿using hCommand;

namespace Persistence {
    public class CsdSplitEngine : GkTransaction
    {
       public CoreStockDet det;
        protected override TransRes Execute( )
        {
            if (det.countDb <= 0) {
                return new TransRes("只能拆分为正数");
            }
            CoreStockDet v = getById<CoreStockDet>(det.id);
            if (v.countDb > det.countDb) {
                CsdUtil.split(this, v, det.countDb);
                return new TransRes();
            } 
            return new TransRes("数量无法拆分");
        }




    }
}
